package week02.skin;

import week02.skin.black_skin.BlackButtonFactory;
import week02.skin.black_skin.BlackFrame;
import week02.skin.black_skin.BlackFrameFactory;
import week02.skin.black_skin.BlackScrollBarFactory;
import week02.skin.blue_skin.BlueButtonFactory;
import week02.skin.blue_skin.BlueFrameFactory;
import week02.skin.blue_skin.BlueScrollBarFactory;
import week02.skin.red_skin.RedButtonFactory;
import week02.skin.red_skin.RedFrameFactory;
import week02.skin.red_skin.RedScrollBarFactory;

/**
 * Created by zhangxiaokun on 2018/1/31.
 */
public class TestSkin {
    public static void main(String[] args) {

        //黑色主题
        FrameFactory frameFactory = new BlackFrameFactory();
        ButtonFactory buttonFactory = new BlackButtonFactory();
        ScrollBarFactory scrollBarFactory = new BlackScrollBarFactory();

//        红色主题
//        FrameFactory frameFactory = new RedFrameFactory();
//        ButtonFactory buttonFactory = new RedFactory();
//        ScrollBarFactory scrollBarFactory = new RedScrollBarFactory();

        // 蓝色主题
//        FrameFactory frameFactory = new BlueFrameFactory();
//        ButtonFactory buttonFactory = new BlueFactory();
//        ScrollBarFactory scrollBarFactory = new BlueScrollBarFactory();

        Frame frame = frameFactory.createFrame();
        Button button = buttonFactory.createButton();
        ScrollBar scrollBar = scrollBarFactory.createScrollBar();

        frame.addComponent(button);
        frame.addComponent(scrollBar);

        button.doClick();
        scrollBar.scroll();
    }
}
